Skip to content

Conversation

DTCurrie
Copy link
Member

@DTCurrie DTCurrie commented May 20, 2025

Introducing a new service type, the WorldStateStoreService.

Visualization modules will utilize this service to retrieve information about the machine's world object store for rendering on the client side.

List of changes:

  1. Add PointCloud geometry type and add it to the oneof geometry_type on the Geometry message
  2. Introduce the WorldStateStoreService with four RPCs:
  • ListUUIDs returns all transform UUIDs
  • GetTransform returns a transform by UUID
  • StreamTransformChangesResponse opens a stream to broadcast changes
  • DoCommand sends/receives arbitrary commands
  1. Update the Transform message:
// Transform contains a pose and two reference frames. The first reference frame is the starting reference frame, and the second reference
// frame is the observer reference frame. The second reference frame has a pose which represents the pose of an object in the first
// reference frame as observed within the second reference frame.
message Transform {
  // the name of a given reference frame
  string reference_frame = 1;
  // the pose of the above reference frame with respect to a different observer reference frame
  PoseInFrame pose_in_observer_frame = 2;
  optional Geometry physical_object = 3;
  // The UUID of the transform
  bytes uuid = 4;
  // Can hold information like color, opacity, points colors, collision_allowed, etc...
  optional google.protobuf.Struct metadata = 5;
}

Scope doc: https://docs.google.com/document/d/1ionvyBa7x3HZU_rwDPBvrAUrQjBrP6sJ10Z_xbBTue8/edit?tab=t.0#heading=h.tcicyojyqi6c

RDK change: viamrobotics/rdk#5149

@DTCurrie DTCurrie self-assigned this May 20, 2025
@github-actions github-actions bot added the safe to test committer is a member of this org label May 20, 2025
@DTCurrie DTCurrie removed request for njooma, randhid and cheukt May 21, 2025 15:18
@DTCurrie
Copy link
Member Author

Removing some folks from review while I tweak things to avoid noise.

@raybjork
Copy link
Contributor

Was there a scope for this? Would be helpful to understand the thinking behind it

@DTCurrie
Copy link
Member Author

Was there a scope for this? Would be helpful to understand the thinking behind it

Yes sorry, meant to add a link in the description. Here you go: https://docs.google.com/document/d/1ionvyBa7x3HZU_rwDPBvrAUrQjBrP6sJ10Z_xbBTue8/edit?tab=t.0#heading=h.tcicyojyqi6c

The API design has been slightly tweaked based on testing @micheal-parks did, but for the most part things are the same.

Copy link
Contributor

@raybjork raybjork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me from a code perspective based on what was decided on in the scope doc. I wonder though if it would be possible to put this under the app proto instead of the general service proto. I expect this API to change frequently and it seems like there is a lot more leniency towards making breaking changes to the App API as compared to resources

@DTCurrie
Copy link
Member Author

DTCurrie commented Jun 2, 2025

This looks good to me from a code perspective based on what was decided on in the scope doc. I wonder though if it would be possible to put this under the app proto instead of the general service proto. I expect this API to change frequently and it seems like there is a lot more leniency towards making breaking changes to the App API as compared to resources

Fair point, I brought this up to steve and he suggested it could live here because it is a new service resource type, but we can mark it as experimental for now, and allow some level of leniency until we have published some Viam-supported visualization modules and are confident with the API.

@micheal-parks has also been testing visualizations with the assumption that this is how the API will work, so we have some real-world proof of concepts to work from. I ended up writing the code to implement the fake model for testing in the RDK. I can work with micheal to test these APIs using his current code and ensure they work as expected, then report back on the results.

I'd be happy to get some more opinions on this before moving forward, though, if you have anyone in mind.

@DTCurrie
Copy link
Member Author

DTCurrie commented Jun 9, 2025

Note from @erh to use existing world object state

@DTCurrie DTCurrie added the ready-for-protos add this when you want protos to compile on every commit label Aug 26, 2025
@DTCurrie DTCurrie removed the ready-for-protos add this when you want protos to compile on every commit label Aug 26, 2025
@DTCurrie DTCurrie added the ready-for-protos add this when you want protos to compile on every commit label Aug 27, 2025
@DTCurrie DTCurrie removed the ready-for-protos add this when you want protos to compile on every commit label Aug 27, 2025
@DTCurrie
Copy link
Member Author

As we are undergoing organizational changes and these APIs are currently in use for high-priority work, I have temporarily reverted the breaking changes. I will only add what is necessary for the world object store service, and supporting point clouds as a geometry type.

Further improvements can be done in tandem with the motion team.

@DTCurrie DTCurrie merged commit 6b93d2a into main Aug 27, 2025
10 of 11 checks passed
@DTCurrie DTCurrie deleted the APP-8003-add-world-object-store-service branch August 27, 2025 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protos-compiled safe to test committer is a member of this org
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants